home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Subject: Re: Locaton of an array?
- X-Nntp-Posting-Host: foley.ripco.com
- Message-ID: <DL3u9u.9yJ@rci.ripco.com>
- Sender: usenet@rci.ripco.com (Net News Admin)
- Organization: Ripco Internet BBS Chicago
- Date: Sat, 13 Jan 1996 05:37:06 GMT
- X-Ident-Sender: mambuhl
-
- maverick@netcom.com (Chris Shepard)
- in <maverickDL1u3x.45I@netcom.com> wrote:
-
- >#include <the usual stuff>
-
- /* just so he'll know: */
- #include <stdio.h> /* for printf */
- #include <stdlib.h> /* for EXIT_SUCCESS */
-
- >int main(void)
- >{
- > char arr[10],
- > *p;
-
- > p=arr;
- > printf("addr of arr = %p\n",p);
- ^^^
- (void *)p
-
- > return(EXIT_SUCCESS);
- >}
-
- More trivially:
-
- #include <stdio.h>
- int main(void)
- {
- char arr[10];
- printf("ptr to arr = %p\n",(void *)arr);
- return 0;
- }
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-